// pages/member/application_member.js
var app = getApp();
var that;
Page({
  data: {
    cat_head_picurl: "../../images/MM.jpg", 
    ser_id:"",  //从项目列表下单处进入
  },
  onLoad: function (options) {
    that=this;
    if (options.f == "home") { 
      that.setData({ f: "home",ser_id: options.ser_id,})
       }
    if (options.f == "goods_detail"){
      that.setData({ f: "goods_detail", fro: options.fro})
    }
 
   

  },
  onReady: function () {
  
  },
  onShow: function () {
  
  },
  toapl2:function(){
    wx.redirectTo({
      url: './invite_code?from=p_center'
    })
  },
  tows: function () {
    app.data.iswarm = 1; //提醒过一遍即可
    // if (app.globalData.userInfo.phone == ''){     //没有电话设置电话，有电话就返回
    //   wx.navigateTo({
    //     url: '../personal_mse/phone?op=op',
    //   })
    // }else{}
      if (that.data.f == "goods_detail"){
        var pages = getCurrentPages()
        var prevPage = pages[pages.length - 2]  //上一个页面
        prevPage.setData({ fro:that.data.fro})
      }
      if (that.data.f == "home") {
        var pages = getCurrentPages()
        var prevPage = pages[pages.length - 2]  //上一个页面
        prevPage.setData({ ser_id: that.data.ser_id })
      }
      wx.navigateBack({ delta: 1 })
      // wx.redirectTo({ url: that.data.url  }); 
 
  },
})